import java.util.HashSet;
import java.util.Set;

public class BookQuery {
	private String title;
	private String author;
	private Set<String> terms = new HashSet<String>();

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public Set<String> getTerms() {
		return terms;
	}

	public void addTerm(String term) {
		terms.add(term);
	}
	
	public void addAllTerms(Set<String> terms) {
		terms.addAll(terms);
	}
	
	@Override
	public String toString() {
		return "Query : Author "+ ((author != null) ? author:"not specified") + " Title " + ((title != null)? title : "not specified");
	}
}
